https://leetcode.cn/problems/letter-combinations-of-a-phone-number/


class Solution {
    string numberStr[10] = { "","","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz" };
public:
    void Combinate(string& digits, size_t depth, string tmp, vector<string>& v)
    {
        if (depth == digits.size())
        {
            v.push_back(tmp);
            return;
        }
        size_t num = digits[depth] - '0';
        string str = numberStr[num];
        for (size_t t = 0;t < str.size();++t)
        {
            Combinate(digits, depth + 1, tmp + str[t], v);
        }



    }

    vector<string> letterCombinations(string digits) {
        vector<string> v;
        if (digits == "")
        {
            return v;
        }
        Combinate(digits, 0, "", v);
        return v;
    }
};